package com.caohx.bms.repository;

import com.caohx.bms.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository   //spring bean   JpaRepository支持增删改查 也支持分页
public interface UserRepository extends JpaRepository<User,Integer> {

    boolean existsByUserName(String userName);

    boolean existsByUserEmail(String userEmail);

    User findByUserName(String userName);

}
